package srw;

import java.util.Vector;

/**
 * Result sentence tree node 
 *
 */

public class WordTreeNode{
	private WordTreeNode _parent;
	private WordTreeNode[] _children;
	private Word _word;
	
	public WordTreeNode(Word word) {
		_word = word;
	}

	public WordTreeNode(WordTreeNode parent, Word word) {
		_parent = parent;
		_word = word;
		_children = new WordTreeNode[_word.getNumberOfArguments()];
	}

	public void setParent(WordTreeNode parent) {
		_parent = parent;
	}

	public void setChild(WordTreeNode child, int number) {
		_children[number] = child;
	}

	public String toString() {
		return _word.getName();
	}

	public Vector<Property> getProperties() {
		return _word.getProperties();
	}
	
	public WordTreeNode[] getChildren() {
		return _children;
	}

	public int getNumberOfArguments() {
		return _word.getNumberOfArguments();
	}

	public Vector<Argument> getArguments() {
		return _word.getArguments();
	}
	
}
